﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Code.Models
{
    public enum UserState
    {
        /// <summary>
        /// 管理员锁定
        /// </summary>
        Locked=-1,
        /// <summary>
        /// 正常
        /// </summary>
        Normal=0,
        /// <summary>
        /// 冻结
        /// </summary>
        Freez=1,
        /// <summary>
        /// 代理锁定
        /// </summary>
        Locked_Manage=2
    }
    public static class UserStateEx
    {
        public static string GetName(this UserState state)
        {
            switch (state)
            { 
                case UserState.Normal:
                    return "正常";
                case UserState.Freez:
                    return "已冻结";
                case UserState.Locked_Manage:
                    return "代理锁定";
                case UserState.Locked:
                    return "管理员锁定";
                default:
                    return state.ToString();
            }
        }
    }
}
